package com.crealth.db;

import java.util.List;
import com.crealth.manager.MybatisManager;
import com.crealth.model.MonthPlanModel;

public class MonthPlanDb {
	public static MonthPlanModel selectUserMonthPlan(int userID) {
		MonthPlanModel monthPlan = MybatisManager.monthPlanMapper.selectUserMonthPlan(userID);
		
		return monthPlan;
	}
	
	public static Integer insertMonthPlan(MonthPlanModel monthPlan) {
		Integer res = MybatisManager.monthPlanMapper.insertMonthPlan(monthPlan);
		MybatisManager.commit();
		
		return res;
	}
	
	public static Integer updateMonthPlan(MonthPlanModel monthPlan) {
		Integer res = MybatisManager.monthPlanMapper.updateMonthPlan(monthPlan);
		MybatisManager.commit();
		
		return res;
	}
	
	public static List<MonthPlanModel> selectTeamMonthPlanByIDs(String userIDs) {		
		List<MonthPlanModel> planls = MybatisManager.monthPlanMapper.selectTeamMonthPlanByIDs(userIDs);
		
		return planls;
	}
	
	public static List<MonthPlanModel> selectTeamMonthPlan() {
		List<MonthPlanModel> planls = MybatisManager.monthPlanMapper.selectTeamMonthPlan();
		
		return planls;
	}
	
	
}
